package com.cloudlinkscm.base.authcenter.service;

import com.cloudlinkscm.base.authcenter.model.dto.*;
import com.cloudlinkscm.loms.framework.core.pojo.RestfulApiResponse;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author : tac
 * @date : 28/07/2017
 */


public interface AuthcRemoteService {
    String PATH = "authc";

    @RequestMapping(value = "authenticate", method = RequestMethod.POST)
    RestfulApiResponse<AccessToken> authenticate(AuthenticationInfo info);

	@RequestMapping(value = "authenticate_web", method = RequestMethod.POST)
	RestfulApiResponse<AuthenticationWebInfo> authenticateWeb(AuthenticationInfo info);

	@RequestMapping(value = "{token}/account", method = RequestMethod.GET)
	RestfulApiResponse<UserAccountDTO> account(@PathVariable("token") String token);

	@RequestMapping(value = "{token}/account_resource", method = RequestMethod.GET)
	RestfulApiResponse<List<ResourceTree>> accountResource(@PathVariable("token") String token);
}
